package com.game.gameshoppingcenter.controller;

import com.game.gameshoppingcenter.entities.Comment;
import com.game.gameshoppingcenter.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller

public class HomeController {
@Autowired
    HomeService homeService;
    @RequestMapping("")
    //进入游客游览主页页面
public String tohome(){
    return "Shoppingstore2/shoppingstore2";

    }
    @RequestMapping("/toshopping")
    //登录后用户游览界面
    public String toshoppingstore(){
        return "Shoppingstore/shoppingstore";
    }
    @RequestMapping("/Century：Age of Ashes")
    public String togames1(Model model,Comment comment){
        model.addAttribute("comment", comment);
        return "/Century：Age of Ashes";

    }
    //到帝国时代4界面
    @RequestMapping("/Age of Empires IV")
    public String togames2( Model model, Comment comment){
        model.addAttribute("comment1",comment);
        return "/Age of Empires IV";

    }
    //到仙界奇侠传7界面
    @RequestMapping("/Chinese Paladin 7")
    public  String togame3(Model model, Comment comment){
        model.addAttribute("comment2",comment);
        return "/Chinese Paladin 7";
    }
    //到CSGO界面
    @RequestMapping("/CSGO")
    public  String togame4(Model model, Comment comment){
        model.addAttribute("comment3",comment);
        return "/CSGO";
    }
    //到战意界面
    @RequestMapping("/Fight")
    public  String togame5(Model model, Comment comment){
        model.addAttribute("comment4",comment);
        return "/Fight";
    }
    //到命运2界面
    @RequestMapping("/Destiny 2")
    public String togame6(Model model, Comment comment){
        model.addAttribute("comment5",comment);
        return "/Destiny 2";
    }
    //到生化危机8界面
    @RequestMapping("Resident Evil：8 Village")
    public String togame7(Model model, Comment comment){
        model.addAttribute("comment5",comment);
        return "/Resident Evil：8 Village";
    }
    //到四个新闻介绍界面
    @RequestMapping("/newspaper1")
    public String tonew(){
        return "newspaper/newspaper1";
    }
    @RequestMapping("/newspaper2")
    public String tonew2(){
        return "newspaper/newspaper2";
    }
    @RequestMapping("/newspaper3")
    public String tonew3(){
        return "newspaper/newspaper3";
    }
    @RequestMapping("/newspaper4")
    public String tonew4(){
        return "newspaper/newspaper4";
    }
}
